package crazy.memory;

public class DrawTest
{
	public static void main(String[] args)
	{
		Account acct = new Account("1234567", 1000);
		new DrawThread("A  ", acct, 800).start();
		new DrawThread("B  ", acct, 800).start();
	}
}

class DrawThread extends Thread
{
	private Account account;
	private double drawAmount;
	
	public DrawThread(String name, Account account, double drawAmount)
	{
		super(name);
		this.account = account;
		this.drawAmount = drawAmount;
	}
	
	public void run()
	{
		account.draw(drawAmount);
	}
}
